<?php 
	include_once("essential/essential.php");
	require_once("essential/check_authenticate.php");
?>

<!doctype>
<html>
	<head>
		<title></title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link href="style/main.css" type="text/css" rel="stylesheet" />
        <link href="style/jquery-te-1.4.0.css" type="text/css" rel="stylesheet" />
		<!-- Latest compiled and minified CSS -->
		<link rel="stylesheet" href="css/bootstrap.min.css">

		<!-- Optional theme -->
		<link rel="stylesheet" href="css/bootstrap-theme.min.css">

		<!-- Latest compiled and minified JavaScript -->
		<script src="js/bootstrap.min.js"></script>
	</head>
	<body>
		<div id="header">
			<div id="top">
				<div>
					<img src="images/header/logo.png" alt="logo"/>
					<h1>Painel <?php echo $_SESSION['GROUPNAME']; ?></h1>
				</div>
			</div>
			<div id="menu">
				<button>Menu de Opções</button>
				<div>
					<ul>
						<li><img src="images/menu-icon/main-ico.png" alt="Principal"/><a href="index.php">Principal</a></li>
						<?php
							$group = new Group();
							$group->select($_SESSION['GROUPID']);
						?>
						<?php
							if($group->get('is_usuarios_grupos'))
							{
						?>
								<li><img src="images/menu-icon/user-ico.png" alt="Principal"/><a href="#" onclick="openDetail('user', 'index');">Usuários</a></li>
								<li><img src="images/menu-icon/group-ico.png" alt="Principal"/><a href="#" onclick="openDetail('group', 'index');">Groups</a></li>
						<?php
							}
						?>
						<?php
							if($group->get('is_candidatos_vagas'))
							{
						?>
                                <li><img src="images/menu-icon/candidato-ico.png" alt="Principal"/><a href="#" onclick="openDetail('candidatos', 'index');">Candidatos</a></li>
								<li><img src="images/menu-icon/jobs-ico.png" alt="Principal"/><a href="#" onclick="openDetail('vagas', 'index');">Vagas</a></li>
                                
						<?php
							}
						?>
                        <?php
							if($group->get('is_gestao_conteudo'))
							{
						?>
								<li><img src="images/menu-icon/content_manager-ico.png" alt="Principal"/><a href="#" onclick="openDetail('content_manager', 'index');">Gestão de Conteudo</a></li>
						<?php
							}
						?>
						<li><img src="images/menu-icon/logoff-ico.png" alt="Principal"/><a href="essential/logoff.php">Sair</a></li>
					</ul>
				</div>
			</div>
		</div>
		<div id="container">
			<h1 class="header">Olá seja bem vindo, <?php echo $_SESSION['NAME'];?></h1>
			<div id="frame">
				<div id="nav">
					<ul>
						<?php 
							if($group->get('is_candidatos_vagas'))
							{
						?>
								<li><div id="vagas-ico"><a href="#" onclick="openDetail('vagas', 'index');">Vagas</a></div></li>
                                <li><div id="candidato-ico"><a href="#" onclick="openDetail('candidatos', 'index');">Candidatos</a></div></li>
						<?php
							}
						?>
                        
						<?php
							if($group->get('is_usuarios_grupos'))
							{
						?>
								<li><div id="usuarios-ico"><a href="#" onclick="openDetail('user', 'index');">Usuários</a></div></li>
								<li><div id="groups-ico"><a href="#" onclick="openDetail('group', 'index');">Grupos</a></div></li>
						<?php
							}
						?>
						
						<?php
							if($group->get('is_gestao_conteudo'))
							{
						?>
								<li><div id="content-ico-big"><a href="#" onclick="openDetail('content_manager', 'index')">Gestão de Conteudo</a></div></li>
						<?php
							}
						?>
					</ul>
				</div>
				<div id="content"></div>
			</div>			
			<div id="footer" class="clear">Todos os direitos reservados</div>
		</div>	
		<script type="text/javascript" src="js/frameworks/jquerylib.js"></script>
		<script type="text/javascript" src="js/frameworks/jquery.min.js"></script>
		<script type="text/javascript" src="js/frameworks/modernizr.js"></script>
        <script type="text/javascript" src="js/plugins/jquery.form.js"></script>
        <script type="text/javascript" src="js/plugins/jquery-te-1.4.0.min.js"></script>
        <script type="text/javascript" src="js/plugins/jquerymask/jquery.mask.js"></script>
        <script type="text/javascript" src="js/plugins/jquerymask/jquery.mask.min.js"></script>
		<script type="text/javascript" src="js/nav-script.js"></script>
		<script type="text/javascript" src="js/anm.js"></script>
		<script type="text/javascript" src="js/validate.js"></script>
	</body>
</html>